/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package edu.umss.arqui10.modelo;

import java.io.Serializable;
import java.math.BigDecimal;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Column;
import javax.persistence.Table;


/**
 *
 * @author rho1and0
 */
@Entity
@Table(name="OutputBean")
public class OutputBean extends Billable implements Serializable {
    @Column(name="name")
    private String name;

    @Column(name="description")
    private String description;

    @Id
    private Long id;

    private boolean usable;
    public OutputBean(String name, String desc, Long id, BigDecimal price) {
        this.name        = name;
        this.description = desc;
        this.id          = id;
        this.usable      = true;
        changeCurrentPrice(price);
    }
    public OutputBean(String name, String desc, Long id) {
        this.name        = name;
        this.description = desc;
        this.id          = id;
    }

    public String getName() {
        return name;
    }

    public String getDescription() {
        return description;
    }
    public void setName(String name){
        this.name = name;
    }
    public void setDescription(String description) {
        this.description = description;
    }

    public Long getId() {
        return id;
    }
    
    public void setUsable(boolean usable) {
        this.usable = usable;
    }

    public boolean isUsable() {
        return this.usable;
    }

    @Override
    public void changeCurrentPrice(BigDecimal newPrice){
        price.changeCurrentPrice(newPrice);
    }
}